/* This code is for the empirical analysis of "Democratization and FDI Liberalization, 1970-2000" International Studies Quarterly forthcoming*//* Last Updated: 6/6/12 */use "/Users/ssp5d/Desktop/RESEARCH/data_sonal/full.interp.entry.dta", cleartsset cty1 year1sort cty1 year1gen ln_gdp_pc = ln(gdp_pc)/* Table 1: Summary Statistics */sum entry_res democracy currency bank reschedule signed_imf  entryres_lang entry_res_colony polity_binary ln_gdp_pc spain_colony france_colony belgium_colony dutch_colony/*Table 2: Baseline Models */xi: xtpcse entry_res l.democracy l.ln_gdp_pc i.year1 i.cty1, corr(psar1) pairwise outreg2 entry_res l.democracy l.ln_gdp_pc using aprtab2.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel replace  use "/Users/ssp5d/Desktop/RESEARCH/data_sonal/full.interp.approve.dta", cleartsset cty1 year1sort cty1 year1gen ln_gdp_pc = ln(gdp_pc) xi: xtpcse approve_agg l.democracy l.ln_gdp_pc i.cty1 i.year1, corr(psar1) pairwise outreg2 entry_res l.democracy l.ln_gdp_pc using aprtab2.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel appenduse "/Users/ssp5d/Dropbox/data_sonal/full.interp.entry.dta", cleartsset cty1 year1sort cty1 year1replace polity4 = polity4 + 10 /* rescale polity4 measure to vary 0-20 */gen polity_binary = 0 replace polity_binary = 1 if polity4 > 15gen ln_gdp_pc = ln(gdp_pc) gen aid = aid_gdp/100gen currency_demo = polity_binary*currencygen bank_demo = polity_binary*bankgen resched_demo = polity_binary*reschedulegen left_demo = l.polity4*l.left_partygen plp_demo = l.polity4*l.plpgen demo_currency = democracy*currency gen demo_bank = democracy*bank  gen demo_resched = democracy*reschedule gen demo_imf = signed_imf*democracylabel var major_jv "Minority Local Ownership"label var polity4 "Polity Score (t-1)"label var currency  "Currency Crisis (t-1)"label var bank "Banking Crisis (t-1)"label var reschedule "Sovereign Debt Rescheduled (t-1)"label var signed_imf "IMF Conditionality (t-1)" label var ln_gdp_pc  "Ln(Per Capita GDP) (t-1)"label var gov_res "Government Ownership (t-1)" label var entry_res "Entry Restrictions"label var approve_agg "Investment Screening"label var democracy "Democracy(Binary)(t-1)"label var majorjv_lang "Average Restrictions - Language Group(t-1)"label var major_jv_colony "Average Restrictions - Colonial Origin(t-1)"label var aid "Aid/GNI(t-1)" label var currency_demo "Currency Crisis(t-1)*Polity Score(t-1)"label var bank_demo "Banking Crisis(t-1)*Polity Score(t-1)"label var resched_demo "Sovereign Debt Rescheduled(t-1)*Polity Score(t-1)"label var demo_currency "Currency Crisis(t-1)*Democracy(Binary)(t-1)"label var demo_bank  "Banking Crisis(t-1)*Democracy(Binary)(t-1)"label var demo_resched "Sovereign Debt Rescheduled(t-1)*Democracy(Binary)(t-1)"label var age_of_demo "Age of Democracy (t-1)"/* Table 3: Economic Crises */xi: xtpcse entry_res l.democracy l.currency l.demo_currency l.ln_gdp_pc i.year1 i.cty1 , corr(psar1) pairwiseoutreg2 entry_res l.democracy l.currency l.demo_currency l.ln_gdp_pc using aprtab3.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel replace  xi: xtpcse entry_res l.democracy l.bank l.demo_bank l.ln_gdp_pc i.cty1 i.year1, corr(psar1) pairwiseoutreg2 entry_res l.democracy l.bank l.demo_bank l.ln_gdp_pc using aprtab3.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel appendxi: xtpcse entry_res l.democracy l.reschedule l.demo_resched l.ln_gdp_pc i.year1 i.cty1, corr(psar1) pairwiseoutreg2 entry_res l.democracy  l.reschedule l.demo_resched l.ln_gdp_pc using aprtab3.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel appendxi: xtpcse entry_res l.democracy l.currency l.bank l.reschedule l.demo_currency  l.demo_bank l.demo_resched l.ln_gdp_pc i.cty1 i.year1, corr(psar1) pairwiseoutreg2 entry_res  l.democracy l.demo_currency l.currency l.bank l.demo_bank l.reschedule l.demo_resched l.ln_gdp_pc using aprtab3.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel append/* Table 4: External Influences on Foreign Ownership Liberalization */xi: xtpcse entry_res  l.democracy l.signed_imf l.ln_gdp_pc i.cty1 i.year1, corr(psar1) pairwiseoutreg2 entry_res l.democracy l.signed_imf l.ln_gdp_pc using aprtab4.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel replacexi: xtpcse entry_res l.democracy l.signed_imf l.demo_imf l.ln_gdp_pc i.cty1 i.year1,corr(psar1) pairwiseoutreg2 entry_res l.democracy l.signed_imf l.demo_imf l.ln_gdp_pc using aprtab4.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel appendxi: xtpcse entry_res l.democracy l.entryres_lang l.entry_res_colony l.ln_gdp_pc i.cty1, corr(psar1) pairwiseoutreg2 entry_res l.democracy l.entryres_lang l.entry_res_colony l.ln_gdp_pc using aprtab4.out, drop(i.cty*) lab 10pct nor2 word excel appendxi: xtpcse entry_res l.democracy spain_colony france_colony belgium_colony dutch_colony l.ln_gdp_pc i.cty1 i.year1, corr(psar1) outreg2 entry_res l.democracy spain_colony france_colony belgium_colony dutch_colony l.ln_gdp_pc using aprtab4.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel appendxi: xtpcse entry_res l.democracy l.currency l.bank l.reschedule l.signed_imf l.entryres_lang l.entry_res_colony l.ln_gdp_pc i.cty, corr(psar1) pairwiseoutreg2 entry_res l.democracy l.currency l.bank l.reschedule l.signed_imf l.entryres_lang l.entry_res_colony l.ln_gdp_pc using aprtab4.out, drop(i.cty*) lab 10pct nor2 word excel append/* Table 5: Alternate Measure of Democratization */xi: xtpcse entry_res l.polity_binary l.ln_gdp_pc i.cty1 i.year1, corr(psar1) pairwiseoutreg2 entry_res l.polity_binary l.ln_gdp_pc using aprtab5.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel replace xi: xtpcse entry_res l.polity_binary l.currency l.bank l.reschedule l.currency_demo l.bank_demo l.resched_demo  l.ln_gdp_pc i.cty1 i.year1, corr(psar1) pairwiseoutreg2 entry_res l.polity_binary l.currency l.bank l.reschedule l.currency_demo l.bank_demo l.resched_demo l.ln_gdp_pc using aprtab5.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel appendxi: xtpcse entry_res l.polity_binary l.signed_imf l.ln_gdp_pc i.cty1 i.year1, corr(psar1) pairwiseoutreg2 entry_res l.polity_binary l.signed_imf l.ln_gdp_pc using aprtab5.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel append gen polity_imf = signed_imf*polity_binaryxi: xtpcse entry_res l.polity_binary l.signed_imf l.polity_imf l.ln_gdp_pc i.cty i.year1, corr(psar1) pairwiseoutreg2 entry_res l.polity_binary l.signed_imf  l.polity_imf l.ln_gdp_pc using aprtab5.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel append xi: xtpcse entry_res l.polity_binary l.entryres_lang l.entry_res_colony l.ln_gdp_pc i.cty1, corr(psar1) pairwiseoutreg2 entry_res l.polity_binary l.entryres_lang l.entry_res_colony l.ln_gdp_pc using aprtab5.out, drop(i.cty*) lab 10pct nor2 word excel append xi: xtpcse entry_res l.polity_binary spain_colony france_colony belgium_colony dutch_colony l.ln_gdp_pc i.cty1 i.year1, corr(psar1) outreg2 entry_res l.polity_binary spain_colony france_colony belgium_colony dutch_colony l.ln_gdp_pc using aprtab5.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel appendxi: xtpcse entry_res l.polity_binary l.currency l.bank l.reschedule l.signed_imf l.entryres_lang l.entry_res_colony l.ln_gdp_pc i.cty1, corr(psar1) pairwiseoutreg2 entry_res l.polity_binary l.currency l.bank l.reschedule l.signed_imf l.entryres_lang l.entry_res_colony l.ln_gdp_pc using aprtab5.out, drop(i.cty*) lab 10pct nor2 word excel append/*Table 6: IV Regression: Time Since Independence */xi: xtivreg entry_res l.ln_gdp_pc (l.democracy=l.time_since), fe first outreg2 entry_res l.democracy l.ln_gdp_pc using aprtab6.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel replace xi: xtivreg entry_res  l.currency l.bank l.reschedule l.signed_imf l.entryres_lang l.entry_res_colony l.ln_gdp_pc (l.democracy=l.time_since), fe first outreg2 entry_res l.democracy l.currency l.bank l.reschedule l.signed_imf l.entryres_lang l.entry_res_colony l.ln_gdp_pc using aprtab6.out, drop(i.cty*,i.year1*) lab 10pct nor2 word excel append   